home *** CD-ROM | disk | FTP | other *** search
/ Commodore Free 28 / Commodore_Free_Issue_28_2009_Commodore_Computer_Club.d64 / iv svfig < prev    next >
Text File  |  2023-02-26  |  16KB  |  624 lines

  1. u
  2.  
  3.  
  4. *************************************
  5. *       INTERVIEW WITH  (SVFIG)     *
  6. *Silicon Valley Forth Interest Group*
  7. *************************************
  8.  
  9. COMMODORE FREE
  10. Please introduce yourselves
  11.  
  12. KEVIN APPERT
  13. I'm Kevin Appert Vice Chair & Program
  14. Chair of the Silicon Valley Forth
  15. Interest Group (SVFIG).
  16.  
  17. AK> Andy Korsak, Forth user
  18. enthusiast since 1977.
  19.  
  20. PG> We're the peanut gallery. We make
  21. comments which are witty or
  22. instructive but anonymous. Some of
  23. the PG comments are from the February
  24. SVFIG meeting.
  25.  
  26. CF> Can you tell our readers about
  27. FIG (Forth Interest Group)?
  28.  
  29. KA> FIG has disbanded. The Silicon
  30. Valley Forth Interest Group (SVFIG)
  31. maintains as much of what FIG did as
  32. practical & appropriate including
  33. FIG's website at http://www.forth.org
  34.  We practice & promote the Forth
  35. Programming language in our area &
  36. worldwide.
  37.  
  38. PG> FIG was a worldwide organization
  39. of Forth users started in the 70s
  40. with the creation of FIG-Forth.
  41.  
  42. KA> FIG-Forth was a publicly
  43. available implementation on every
  44. common microprocessor of the time.
  45. This brought Forth to the masses &
  46. precipitated a long era of Forth
  47. popularity.
  48.  
  49. PG> We'll quibble about the "EVERY
  50. common microprocessor".
  51.  
  52. KA> There were some obscure ones
  53. which weren't implemented but ALL the
  54. microprocessors that were commonly
  55. used at the time were implemented. If
  56. anyone can come up with a counter-
  57. example, I'd be pleased to hear
  58. about it.
  59.  
  60. CF> Where do you meet?
  61.  
  62. KA> SVFIG is currently meeting once a
  63. month at Stanford University in Palo
  64. Alto, California. We maintain a
  65. continuous "virtual meeting" through
  66. our email list & web site. Once per
  67. year SVFIG hosts Forth Day, the gala
  68. Forth festival notable as the venue
  69. for Chuck Moore's "Fireside Chat".
  70. Video from this past Forth Day will
  71. be on the site within the next month
  72. or so.
  73.  
  74. CF> Are there FIG groups in other
  75. countries?
  76.  
  77. KA> There are other communities of
  78. Forth devotees on the web & in
  79. other countries listed under "Other
  80. Forth Groups" on our home page at
  81. http://forth.org/  If you are
  82. interested in one of these groups you
  83. can contact them directly. There is a
  84. longstanding community on
  85. news:comp.lang.forth which can be
  86. reached through
  87. http://groups.google.com/ Our website
  88. is a member of the Forth Web Ring
  89. which you can navigate with the strip
  90. near the bottom of the home page.
  91.  
  92. CF> How could someone join?
  93.  
  94. KA> There is no formal membership.
  95. One participates by subscribing to
  96. the mailing list or coming to a
  97. meeting.
  98.  
  99. CF> Can you tell our readers how
  100. Forth as a language started & the
  101. approximate year?
  102.  
  103. KA> The year was 1968. Forth was
  104. invented by Chuck Moore to facilitate
  105. the design graphics software he was
  106. writing. You can read about it in
  107. more detail at some of the sites
  108. listed below...
  109.  
  110. History of Forth:
  111.  
  112. http://www.colorforth.com/bio.html
  113.  
  114. http://www.forth.com/corp/
  115.  background.html
  116.  
  117. http://www.forth.com/resources/
  118.  evolution/index.html
  119.  
  120. http://en.wikipedia.org/wiki/
  121.  Forth_(programming_language)#History
  122.  
  123. http://en.wikipedia.org/
  124.  wiki/Chuck_Moore
  125.  
  126. AK> The genius inventor, Charles H.
  127. Moore, was just interviewed & tells
  128. the story:
  129. http://www.computerworld.com.au/
  130.  article/250530/-z_programming_
  131.  languages_forth?pp=1
  132.  
  133. CF> Do you know why there was a need
  134. for such a language to evolve?
  135.  
  136. KA> From the very start, Forth was
  137. the solution to any number of
  138. problems. It's very effective & fun
  139. to use.
  140.  
  141. AK> When Bill Ragsdale (look him up
  142. at http://qrz.com -- he's now a radio
  143. ham,  as I am) & Dave Boulton gave
  144. us a brief talk about their setting
  145. up the first FIG back around 1977 at
  146. a Homebrew Computer Club meeting at
  147. Stanford University.
  148.  
  149. PG> The three factors which most
  150. fertilized the birth of Forth were:
  151.  
  152. 1) Portability - an instruction-set
  153. Diaspora was making it necessary to
  154. have some way of moving easily from
  155. one machine to another.
  156.  
  157. B) Interactivity - computing was
  158. changing into a process where a
  159. programmer could interact in real
  160. time with the computer.
  161.  
  162. III) Simplicity - a simple &
  163. consistent architecture & syntax
  164. for human-machine interaction.
  165.  
  166. CF> When did you first come into
  167. "contact" with Forth as a language?
  168.  
  169. KA> I first learned about Forth from
  170. the Byte magazine "Forth Issue" &
  171. an inexpensive Forth which was
  172. available at the time for my
  173. 6502-based OSI-C1P computer.
  174.  
  175. PG> Forth, Inc. had a booth at Wescon
  176. in San Francisco in 1975.
  177.  
  178. CF> Why in your opinion is the
  179. language still in use & who still
  180. uses the language?
  181.  
  182. KA> Forth has much to recommend it.
  183. You can roam the web for hours
  184. reading about its benefits.
  185. The most important aspect of Forth to
  186. me is the capability of producing
  187. reliable programs. There are two
  188. reasons for this:
  189.  
  190. 1) Proper Forth source is small,
  191. modular & simple. The code is
  192. frequently "correct by inspection".
  193. You can look at it & see problems
  194. or their lack.
  195.  
  196. B) Modules can be incrementally &
  197. interactively tested in the Forth
  198. environment.
  199.  
  200. Please note that there are no
  201. guarantees of producing reliable code
  202. with ANY language. There are few
  203. "safety guards" in Forth. Like a
  204. sharp tool, Forth can be used to
  205. great effect or when used improperly
  206. it can lop off fragments of anatomy.
  207.  
  208. Mitch Bradley writes: "Forth is weird
  209. compared to most popular computer
  210. languages. Until you learn how, it is
  211. hard to read because it is not based
  212. on the syntax of algebraic
  213. expressions."
  214.  
  215. "But it is worth learning because a
  216. running Forth system gives you an
  217. extraordinary degree of low-level
  218. control over the system. Unlike most
  219. other programming environments that
  220. put up walls to hide or block access
  221. to "unauthorized" things, Forth makes
  222. it easy to get at anything, at any
  223. level from low to high."
  224.  
  225. CF> Who still uses the language?
  226.  
  227. KA> Forth programming, as distinct
  228. from using things written in Forth,
  229. is still popular in certain quarters.
  230. Here are a few users:
  231.  
  232. * There are a lot of hobbyists &
  233. enthusiasts.
  234.  
  235. * Forth Inc. is the largest
  236. commercial Forth house. Some of their
  237. successes are described on their
  238. website.
  239.  
  240. * IntellaSys has a chip with an array
  241. of 40 Forth processors.
  242.  
  243. * A lot of Sun machines start up with
  244. Open Firmware, a dialect of Forth.
  245. The One Laptop Per Child project
  246. hardware also uses Open Firmware.
  247.  
  248. * MPE in England is another Forth
  249. business.
  250.  
  251. * An MPE customer, Construction
  252. Computer Software (CCS) in Cape Town
  253. produce the MARS & CANDY
  254. applications which are a standard all
  255. over the world.
  256.  
  257. CF> What are the main benefits of the
  258. Forth language?
  259.  
  260. KA> How much time do you have? I
  261. could go on for hours! Here are some
  262. quick thoughts:
  263.  
  264. * It's a tool for the production of a
  265. RELIABLE product
  266.  
  267. * It's extensible. You add on to the
  268. language at will.
  269.  
  270. * It's quick to code. You can put
  271. together a working prototype in the
  272. blink of an eye & iterate it into a
  273. finished product with astounding
  274. speed. A do-over is frequently
  275. necessary even in the best-planned
  276. implementation effort & with Forth
  277. you can come to this realization
  278. sooner & re-implement within the
  279. time available instead of duct-taping
  280. your first try.
  281.  
  282. * It executes quickly. Small pieces
  283. are easy to optimize & an assembler
  284. is built into the language when
  285. necessary for machine-language speed.
  286.  
  287. * It's a programmer amplifier. It
  288. makes a good programmer better. Of
  289. course there are bad programmers &
  290. the attendant downside.
  291.  
  292. * It's frugal with machine resources.
  293. Some might tell you the era of the
  294. resource-limited computers is over
  295. but there are still plenty of
  296. applications where battery, memory,
  297. or other resources are constrained.
  298. Note that size also figures into my
  299. comments about reliability.
  300.  
  301. * It's portable. I'm not aware of any
  302. general-purpose processor that has no
  303. Forth. Implementation is
  304. comparatively simple & usually
  305. straightforward. I can demonstrate
  306. this by noting the vast array of
  307. available Forth's & Forth-like
  308. Languages available for the asking
  309. (and  the buying, of course) for any
  310. computer you'd care to name.
  311.  
  312. * It can be its own operating system
  313. for embedded applications including a
  314. cooperative multi-tasker.
  315.  
  316. * It's the native language of custom
  317. or FPGA Forth processors like the
  318. IntellaSys SeaForth-24 chip, an array
  319. of 24 Forth processors with
  320. spectacular potential. More about
  321. this later on.
  322.  
  323. * It's interactive. You can test a
  324. module immediately after writing it,
  325. while you still have all aspects of
  326. it in your head.
  327.  
  328. * It's the language of choice for
  329. interacting with & bringing up new
  330. hardware. My favourite examples of
  331. this are the Mac & the Atari ST.
  332. Both of which had Forth as their
  333. 'milk language' in the early times on
  334. the bench.
  335.  
  336. CF> Is Forth an abbreviation like
  337. BASIC (beginners all purpose symbolic
  338. instruction code)?
  339.  
  340. KA> No, it's just a word, not an
  341. acronym. Chuck Moore was using what
  342. he perceived to be the fourth
  343. generation of computing & had to
  344. throw one letter overboard because
  345. his OS only had five-character
  346. strings.
  347.  
  348. CF> Is Forth a compiled language? For
  349. the benefit of the readers unsure
  350. about the term "compiled" can you
  351. explain its meaning.
  352.  
  353. KA> As it says on some social
  354. networking sites, "It's complicated".
  355. AC-language compiler, for example,
  356. runs & translates source code into
  357. the directly-executable machine
  358. instructions of a given
  359. microprocessor or computer. When you
  360. compile Forth source it is translated
  361. by a simple compiler into
  362. instructions for Forth's "Virtual
  363. Machine". When you run a compiled C
  364. program the computer executes its
  365. instructions. In traditional Forth,
  366. an Interpreter takes the Virtual
  367. Machine instructions & gives them
  368. to the CPU as machine instructions.
  369. Some modern Forths have evolved into
  370. other approaches including pure
  371. compilation & something called
  372. subroutine-threaded code but
  373. old-school Forth had this method of
  374. two-phase compile-time & run-time
  375. execution.
  376.  
  377. CF> Do you know anything about the
  378. Forth implementation on the Commodore
  379. range of machines?
  380.  
  381. KA> Here's somebody's list:
  382. http://www.npsnet.com/danf/cbm/
  383.  languages.html# FORTH
  384.  
  385. I recall using Forth on Pets' & 64s
  386. many years ago. If I wanted a Forth
  387. now for a Commodore machine I'd poke
  388. around on the Internet, ask around on
  389. the SVFIG email & comp.lang.forth
  390. then I'd try to port 6502FIG-Forth.
  391.  
  392. Here's an example of an Internet
  393. download:
  394. http://cbmfiles.com/genie/
  395.  C64-128ToolkitListing.html
  396. 1348 BLAZIN'FORTH  MAZAX 860610 25200
  397. Desc: Full Fig-83 Forth for C=64
  398.  
  399. CF> I really should ask "How do you
  400. get started programming in Forth"
  401.  
  402. KA> There are downloadable Forth
  403. packages on the Internet. I'd suggest
  404. you start with a PC & WIN32Forth.
  405. It has a community of users for
  406. questions & encouragement. You can
  407. join the SVFIG email list for more
  408. interaction with other Forth users.
  409.  
  410. CF> In every language the programmer
  411. comes out with a line like "I wish
  412. the language could do.." Is there
  413. something missing in Forth?
  414.  
  415. KA> Forth's extensibility makes you
  416. responsible for your own destiny in
  417. this regard. Mostly we add on things
  418. they perceive to be missing.
  419. Sometimes we appropriate other's
  420. additions.
  421.  
  422. CF> Is Forth A high or low level
  423. language?
  424.  
  425. KA> YES!  Really, both... see below.
  426. This a great question for Forth.
  427.  
  428. From Computer Hope: High Level
  429. Language A type of advanced computer
  430. programming language that isn't
  431. limited by the type of computer or
  432. for one specific job & is more
  433. easily understood. Today, there are
  434. dozens of high-level languages; some
  435. commonly used high-level languages
  436. are BASIC, C, FORTAN & Pascal.
  437.  
  438. A low level language like Assembly
  439. Language has a one-to-one
  440. correspondence with the instructions
  441. of the machine. There is no
  442. abstraction of the tedious shuffling
  443. around of individual memory locations
  444. and registers. A moderate-level
  445. language like FORTRAN or C  invokes
  446. functions & operations by name
  447. instead of having to have each  small
  448. step spelled out & takes care of
  449. some of the book-keeping &
  450. busy-work for you so that you can
  451. express your program in something
  452. closer to English & equations.
  453.  
  454. Forth bridges these levels of
  455. abstraction. We start at the
  456. low-level simple operations like
  457. addition, subtraction & memory
  458. manipulation. Occasionally it may be
  459. necessary to go below even this low
  460. level into the built-in assembler. We
  461. use these simple pieces in
  462. combination with built-in higher
  463. -level constructs to build tools of
  464. increasing abstraction with which we
  465. solve the problem put before us.
  466.  
  467. CF> Does the language work via line
  468. numbers?
  469.  
  470. KA> There are no line numbers. There
  471. are no GOTOs, because although they
  472. have their uses we generally still
  473. consider them harmful.
  474.  
  475. CF> Can you give an overview of how
  476. the language works?
  477.  
  478. KA> To write a program you define
  479. modules. We call them "words". We
  480. keep them in a "dictionary". Forth
  481. starts out having some words & you
  482. define more words in terms of the
  483. existing ones until you have one word
  484. or a small set of words which
  485. performs your application.
  486.  
  487. For example, I can define a word to
  488. print "Hello world!" with the
  489. following:
  490.  
  491.  : say_hi  ." Hello world!" ;
  492.  
  493. Then, I can make a word to it ten
  494. times like this:
  495.  
  496.  : 10_hi  10 0  do say_hi  cr loop  ;
  497.  
  498. From the command line, I would just
  499. type 10_hi & the result would be:
  500.  
  501.     10_hi      Hello world!
  502.     Hello world!
  503.     Hello world!
  504.     Hello world!
  505.     Hello world!
  506.     Hello world!
  507.     Hello world!
  508.     Hello world!
  509.     Hello world!
  510.     Hello world!
  511.  
  512. Here's another example...
  513. Let's say I wanted to put numbers in
  514. front of each line in the example
  515. above. I'd define a new word:
  516.  
  517.  : Numbered-hi cr
  518.     10 0 do i 1+ .   ."   " say_hi cr
  519.     loop  ;
  520.  
  521.     Numbered-hi
  522.     1  Hello world!
  523.     2  Hello world!
  524.     3  Hello world!
  525.     4  Hello world!
  526.     5  Hello world!
  527.     6  Hello world!
  528.     7  Hello world!
  529.     8  Hello world!
  530.     9  Hello world!
  531.     10  Hello world!
  532.  
  533. CF> How fast is Forth compared to
  534. other languages like ASSEMBLER or
  535. BASIC, & also how compact is the
  536. code?
  537.  
  538. KA> Forth tends to be much faster
  539. than BASIC, It can be as fast as
  540. assembly when it needs to be by good
  541. implementation &/or actual use of
  542. assembly code. It tends to be much
  543. faster than poorly written assembly.
  544. The key to this is spot optimization
  545. and good design. There are actually
  546. some Forths with optimizations but in
  547. general the onus is on you to obtain
  548. the desired performance.
  549.  
  550. CF> Are there any books our reader
  551. should look out for while starting
  552. his journey programming in Forth?
  553.  
  554. KA> Forth books are generally out of
  555. print. You can get used ones with
  556. fair ease. There are some hits on
  557. Amazon.com
  558.  
  559. Although it isn't in print on paper,
  560. I recommend "Starting Forth" by Leo
  561. Brodie. It's available online here:
  562. http://home.iae.nl/users/mhx/sf.html
  563. and on Forth, Inc.'s web site. For the
  564. more advanced users, Forth, Inc. has
  565. a couple of good books here:
  566. http://www.forth.com/forth/
  567.  forth-books.html
  568.  
  569. "Thinking Forth" isn't for beginners
  570. but it is highly recommended once
  571. you've gotten started. It's available
  572. from Amazon. They're using
  573. print-to-order technology to produce
  574. one copy at a time. It's online as
  575. well as in dead tree format.
  576.  
  577. CF> Is there a question you would
  578. have liked to have been asked?
  579.  
  580. KA> Where would I come across Forth
  581. in my daily life?
  582. There are many applications of Forth
  583. in use today. One of the most
  584. prevalent is the FedEx "wand" used by
  585. all of that firm's couriers.
  586. PostScript & PDF are Forth-Like
  587. Languages. Forth, Inc. & MPE's
  588. websites have lots of interesting
  589. success stories. Ask Leon at Forth,
  590. Inc. if he'll do one of these
  591. interviews & tell you about some of
  592. Forth's victories.
  593.  
  594. CF> Do you have any comments you
  595. would like to add?
  596.  
  597. KA> There is lots of Forth
  598. information on the Internet. It's
  599. like drinking from a firehouse
  600. sometimes.  http://www.forth.org &
  601. http://www.forth.org/svfig are good
  602. places to start. If you're interested
  603. in Forth & SVFIG, subscribe to the
  604. email list & read comp.lang.forth
  605. The IntellaSys chips will soon be
  606. available to hobbyists in small
  607. quantities. Look for announcements on
  608. http://www.forth.org/svfig
  609. and comp.lang.forth
  610.  
  611. Forth Incorporated is the world's
  612. leading commercial Forth firm as you
  613. might expect. They have email lists
  614. for discussion of their SwiftForth
  615. and SwiftX products to which anyone
  616. may subscribe.
  617.  
  618. Wikipedia has an article on Forth at:
  619.  
  620. http://en.wikipedia.org/wiki/
  621.  Forth_(programming_language)
  622.  
  623. ================================
  624.